The Office 2007 themes, which are represented by the Office2007BlackTheme, Office2007BlueTheme, and Office2007SilverTheme classes, are pixel-perfect themes that can be seamlessly integrated into any Office 2007-like application.
Figure 1: Table view in Office 2007 Blue theme |
The Office 2007 themes are contained in the Xceed.Wpf.DataGrid.Themes.Office2007 assembly, which must be added to the project references (see Table 1).
Table 1: Office 2007 theme syntaxes
Theme | color palette | Attribute syntax | Property element syntax | Target views | Assembly |
---|---|---|---|---|---|
Office 2007 | Blue | [View.]Office2007.Blue [View.]Office2007BlueTheme |
Office2007BlueTheme | TableflowView and TableView | Xceed.Wpf.DataGrid.Themes.Office2007 |
Office 2007 | Black | [View.]Office2007.Black [View.]Office2007BlackTheme |
Office2007BlackTheme | TableflowView and TableView CardView and CompactCardView |
Xceed.Wpf.DataGrid.Themes.Office2007 |
Office 2007 | Silver | [View.]Office2007.Silver [View.]Office2007SilverTheme |
Office2007SilverTheme | TableflowView and TableView CardView and CompactCardView |
Xceed.Wpf.DataGrid.Themes.Office2007 |
All examples in this topic assume that the grid is bound to the Employees table of the Northwind database, unless stated otherwise.
Example 1: Using Office 2007 themes
The following example demonstrates how to set an Office 2007 using property element syntax.
XAML |
Copy Code |
---|---|
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> <Grid.Resources> <xcdg:DataGridCollectionViewSource x:Key="cvs_employees" Source="{Binding Source={x:Static Application.Current}, Path=EmployeesTable}"/> </Grid.Resources> <xcdg:DataGridControl x:Name="EmployeesGrid" ItemsSource="{Binding Source={StaticResource cvs_employees}}"> <xcdg:DataGridControl.View> <xcdg:CardView> <xcdg:CardView.Theme> <xcdg:Office2007BlackTheme/> </xcdg:CardView.Theme> </xcdg:CardView> </xcdg:DataGridControl.View> </xcdg:DataGridControl> </Grid> |